<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
         *{
            margin: 0;
            padding: 0;
        }
        body,html{
            overflow: hidden;
            width: 100%;
            height: 100%;
            background-color: gray;
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: -1000;
            user-select: none;
        }
        .container{
            width: 1200px;
            height: 1000px;
            display: grid;
            grid-template-columns: repeat(100,1%);
        }
        .point{
            width: 10px;
            height: 10px;
            background-color: rgba(16, 139, 240, 0.116);
            border-radius: 50%;
            justify-content: center;
            align-items: center;
        }
    </style>
</head>
<body>
    <div class="container" id='container'></div>
    <script>
        let click = 0
        document.addEventListener('mousedown',()=>{
            click = 1
        })
        document.addEventListener('mouseup',()=>{
            click = 0
        })
        let dom = document.getElementById('container')
        change = function(e){
            let arr = ['red','blue','white','green']
            let temp = arr.pop()
            if(click){e.target.style.backgroundColor = temp;arr.shift(temp)}
            
        }
        for(let index = 1;index<10001;index++){
            let newDom = document.createElement('div')
            newDom.classList.add('point')
            newDom.style = '--i'+':'+ index
            dom.appendChild(newDom)
            newDom.addEventListener('mouseenter',change,false)
        }
        
    </script>
</body>
</html>